# 默认执行 make 将进行 build
all:
	@echo "Build started"
	python3 ./setup.py sdist bdist_wheel

# make install 将安装到系统(建议使用sudo)
install:
	python3 ./setup.py install

# make install-user 将安装到当前用户目录
install-user:
	python3 ./setup.py install --user

# make install-whl 将安装 all 编译出的分发包到系统
install-whl: 
	python3 -m pip install ./dist/spark-0.1-py3-none-any.whl

# make install-whl-user 将安装 all 编译出的分发包到当前用户目录
install-whl-user: 
	python3 -m pip install --user ./dist/spark-0.1-py3-none-any.whl

# make clean 将进行清空一些产生的文件
clean: 
	rm -rf dist build spark.egg-info

# 进入命令行调试环境，将当前目录加入到 PYTHONPATH 中以提供包查找路径
enter-environment:
	export PYTHONPATH=`pwd` && bash